'''
    author: starlee
    @2019.03.08
    数据库操作
'''
# 初始化数据库连接配置
import json
with open ("./cfg.json") as fp:
    cfgs = json.load(fp)

import psycopg2
conn = psycopg2.connect(
        database=cfgs["db_name"], user=cfgs["db_user"], 
        password=cfgs["db_passwd"],host="localhost",port="5432")
